﻿namespace ACCOUNTING
{
    using ACCOUNTING.LVY.Business;
    using ACCOUNTING.My.Resources;
    using C1.Win.C1Command;
    using C1.Win.C1FlexGrid;
    using C1.Win.C1FlexGrid.Util.BaseControls;
    using Excel;
    using Microsoft.VisualBasic;
    using Microsoft.VisualBasic.CompilerServices;
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Diagnostics;
    using System.Drawing;
    using System.Reflection;
    using System.Runtime.CompilerServices;
    using System.Windows.Forms;

    [DesignerGenerated]
    public class Frm_TruyVanHangTonKho : Form
    {
        private static List<WeakReference> __ENCList = new List<WeakReference>();
        [AccessedThroughProperty("C1DockingTab1")]
        private C1DockingTab _C1DockingTab1;
        [AccessedThroughProperty("C1DockingTabPage1")]
        private C1DockingTabPage _C1DockingTabPage1;
        [AccessedThroughProperty("C1DockingTabPage2")]
        private C1DockingTabPage _C1DockingTabPage2;
        [AccessedThroughProperty("CboHangSanXuat")]
        private ComboBox _CboHangSanXuat;
        [AccessedThroughProperty("CboHienThi")]
        private ComboBox _CboHienThi;
        [AccessedThroughProperty("CboKho")]
        private ComboBox _CboKho;
        [AccessedThroughProperty("CboNhomHang")]
        private ComboBox _CboNhomHang;
        [AccessedThroughProperty("CboXuatXu")]
        private ComboBox _CboXuatXu;
        [AccessedThroughProperty("CmdExel")]
        private System.Windows.Forms.Button _CmdExel;
        [AccessedThroughProperty("CmdOK")]
        private System.Windows.Forms.Button _CmdOK;
        [AccessedThroughProperty("Label1")]
        private System.Windows.Forms.Label _Label1;
        [AccessedThroughProperty("Label13")]
        private System.Windows.Forms.Label _Label13;
        [AccessedThroughProperty("Label2")]
        private System.Windows.Forms.Label _Label2;
        [AccessedThroughProperty("Label3")]
        private System.Windows.Forms.Label _Label3;
        [AccessedThroughProperty("Label4")]
        private System.Windows.Forms.Label _Label4;
        [AccessedThroughProperty("Label5")]
        private System.Windows.Forms.Label _Label5;
        [AccessedThroughProperty("Label6")]
        private System.Windows.Forms.Label _Label6;
        [AccessedThroughProperty("Panel1")]
        private Panel _Panel1;
        [AccessedThroughProperty("TabControl1")]
        private C1DockingTab _TabControl1;
        [AccessedThroughProperty("TxtTimMa")]
        private System.Windows.Forms.TextBox _TxtTimMa;
        [AccessedThroughProperty("TxtTimTen")]
        private System.Windows.Forms.TextBox _TxtTimTen;
        [AccessedThroughProperty("updNam")]
        private NumericUpDown _updNam;
        [AccessedThroughProperty("updThang")]
        private NumericUpDown _updThang;
        [AccessedThroughProperty("VSlist")]
        private C1.Win.C1FlexGrid.C1FlexGrid _VSlist;
        private IContainer components;
        private bool mAllowAdd;
        private bool mAllowDel;
        private bool mAllowEdit;
        private bool mAllowView;
        private DataView objData;

        [DebuggerNonUserCode]
        public Frm_TruyVanHangTonKho()
        {
            base.Load += new EventHandler(this.Frm_TruyVanHangTonKho_Load);
            List<WeakReference> list = __ENCList;
            lock (list)
            {
                __ENCList.Add(new WeakReference(this));
            }
            this.InitializeComponent();
        }

        private void CmdExel_Click(object sender, EventArgs e)
        {
            if (this.VSlist.Rows.Count != 1)
            {
                try
                {
                    ApplicationClass class2 = new ApplicationClass();
                    ApplicationClass class3 = class2;
                    class3.SheetsInNewWorkbook = 1;
                    class3.Workbooks.Add(Missing.Value);
                    NewLateBinding.LateCall(class3.Worksheets[1], null, "Select", new object[0], null, null, null, true);
                    NewLateBinding.LateSetComplex(class3.Cells[1, 1], null, "value", new object[] { modGeneral.Tranlated("H\x00c0NG TỒN KHO", "") }, null, null, false, true);
                    NewLateBinding.LateSetComplex(NewLateBinding.LateGet(NewLateBinding.LateGet(class3.Cells[1, 1], null, "EntireRow", new object[0], null, null, null), null, "Font", new object[0], null, null, null), null, "Size", new object[] { "20" }, null, null, false, true);
                    NewLateBinding.LateSetComplex(class3.Cells[2, 1], null, "value", new object[] { modGeneral.Tranlated("Kho:", "") + this.CboKho.Text }, null, null, false, true);
                    int num2 = 1;
                    int num5 = this.VSlist.Cols.Count - 1;
                    int num = 1;
                    while (num <= num5)
                    {
                        if (this.VSlist.Cols[num].Visible)
                        {
                            NewLateBinding.LateSetComplex(class3.Cells[4, num2], null, "value", new object[] { RuntimeHelpers.GetObjectValue(this.VSlist[0, num]) }, null, null, false, true);
                            NewLateBinding.LateSetComplex(NewLateBinding.LateGet(NewLateBinding.LateGet(class3.Cells[4, num2], null, "EntireRow", new object[0], null, null, null), null, "Font", new object[0], null, null, null), null, "Bold", new object[] { true }, null, null, false, true);
                            num2++;
                        }
                        num++;
                    }
                    int num6 = this.VSlist.Rows.Count - 1;
                    for (int i = 2; i <= num6; i++)
                    {
                        int num3 = 1;
                        int num7 = this.VSlist.Cols.Count - 1;
                        for (num = 1; num <= num7; num++)
                        {
                            if (this.VSlist.Cols[num].Visible)
                            {
                                NewLateBinding.LateSetComplex(class3.Cells[i + 4, num3], null, "Value", new object[] { RuntimeHelpers.GetObjectValue(this.VSlist[i, num]) }, null, null, false, true);
                                num3++;
                            }
                        }
                    }
                    class3.Visible = true;
                    class3 = null;
                }
                catch (Exception exception1)
                {
                    ProjectData.SetProjectError(exception1);
                    Exception exception = exception1;
                    MessageBox.Show(exception.Message.ToString());
                    ProjectData.ClearProjectError();
                }
            }
        }

        private void CmdOK_Click(object sender, EventArgs e)
        {
            this.LoadHangHoa();
        }

        [DebuggerNonUserCode]
        protected override void Dispose(bool disposing)
        {
            if (disposing && (this.components != null))
            {
                this.components.Dispose();
            }
            base.Dispose(disposing);
        }

        private void Frm_TruyVanHangTonKho_Load(object sender, EventArgs e)
        {
            LVYModule.GetUserRight(ref this.mAllowView, ref this.mAllowDel, ref this.mAllowEdit, ref this.mAllowAdd, Conversions.ToString(this.Tag), modGeneral.H_USERNAME);
            if (!this.mAllowView)
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn kh\x00f4ng c\x00f3 quyền xem, li\x00ean hệ với người quản trị để biết th\x00eam chi tiết.", ""));
                this.Dispose();
            }
            else
            {
                BuildComboModule.BuildCombo(this.CboKho, modGeneral.ListDanhMuc.KhoHang, true, "", modGeneral.Tranlated("Tất cả", ""));
                this.CboKho.SelectedValue = LVYModule.ReturnIfNull(modGeneral.H_STOCKID, "", modGeneral.TypeOfValue.Nothing).ToString().Trim();
                BuildComboModule.BuildCombo(this.CboNhomHang, modGeneral.ListDanhMuc.NhomHangHoa, true, "", modGeneral.Tranlated("Tất cả", ""));
                this.CboNhomHang.SelectedIndex = 0;
                BuildComboModule.BuildCombo(this.CboHangSanXuat, modGeneral.ListDanhMuc.HangSanXuat, true, "", modGeneral.Tranlated("Tất cả", ""));
                this.CboHangSanXuat.SelectedIndex = 0;
                BuildComboModule.BuildCombo(this.CboXuatXu, modGeneral.ListDanhMuc.QuocGia, true, "", modGeneral.Tranlated("Tất cả", ""));
                this.CboXuatXu.SelectedIndex = 0;
                this.updThang.Value = new decimal(DateAndTime.Month(DateAndTime.Today));
                this.updNam.Value = new decimal(DateAndTime.Year(DateAndTime.Today));
                this.CboHienThi.Items.Clear();
                this.CboHienThi.Items.Add(modGeneral.Tranlated("Tất cả c\x00e1c mặt h\x00e0ng", ""));
                this.CboHienThi.Items.Add(modGeneral.Tranlated("H\x00e0ng tồn kho", ""));
                this.CboHienThi.Items.Add(modGeneral.Tranlated("C\x00e1c mặt h\x00e0ng tồn \x00e2m", ""));
                this.CboHienThi.SelectedIndex = 1;
            }
        }

        [DebuggerStepThrough]
        private void InitializeComponent()
        {
            ComponentResourceManager manager = new ComponentResourceManager(typeof(Frm_TruyVanHangTonKho));
            this.CmdExel = new System.Windows.Forms.Button();
            this.Label6 = new System.Windows.Forms.Label();
            this.CboHangSanXuat = new ComboBox();
            this.CboHienThi = new ComboBox();
            this.CboKho = new ComboBox();
            this.updNam = new NumericUpDown();
            this.Label1 = new System.Windows.Forms.Label();
            this.updThang = new NumericUpDown();
            this.CboNhomHang = new ComboBox();
            this.CmdOK = new System.Windows.Forms.Button();
            this.Label2 = new System.Windows.Forms.Label();
            this.Label13 = new System.Windows.Forms.Label();
            this.Label3 = new System.Windows.Forms.Label();
            this.Label4 = new System.Windows.Forms.Label();
            this.CboXuatXu = new ComboBox();
            this.C1DockingTab1 = new C1DockingTab();
            this.C1DockingTabPage1 = new C1DockingTabPage();
            this.TabControl1 = new C1DockingTab();
            this.C1DockingTabPage2 = new C1DockingTabPage();
            this.Panel1 = new Panel();
            this.TxtTimTen = new System.Windows.Forms.TextBox();
            this.Label5 = new System.Windows.Forms.Label();
            this.TxtTimMa = new System.Windows.Forms.TextBox();
            this.VSlist = new C1.Win.C1FlexGrid.C1FlexGrid();
            this.updNam.BeginInit();
            this.updThang.BeginInit();
            ((ISupportInitialize) this.C1DockingTab1).BeginInit();
            this.C1DockingTab1.SuspendLayout();
            this.C1DockingTabPage1.SuspendLayout();
            ((ISupportInitialize) this.TabControl1).BeginInit();
            this.TabControl1.SuspendLayout();
            this.C1DockingTabPage2.SuspendLayout();
            this.Panel1.SuspendLayout();
            this.VSlist.BeginInit();
            this.SuspendLayout();
            this.CmdExel.Image = (Image) manager.GetObject("CmdExel.Image");
            this.CmdExel.ImageAlign = ContentAlignment.MiddleLeft;
            System.Drawing.Point point = new System.Drawing.Point(0x2c0, 0x40);
            this.CmdExel.Location = point;
            this.CmdExel.Name = "CmdExel";
            Size size = new Size(0x58, 0x18);
            this.CmdExel.Size = size;
            this.CmdExel.TabIndex = 0x55;
            this.CmdExel.Text = "&Excel";
            this.CmdExel.UseVisualStyleBackColor = true;
            this.Label6.AutoSize = true;
            this.Label6.BackColor = Color.Transparent;
            point = new System.Drawing.Point(0x16, 0x45);
            this.Label6.Location = point;
            this.Label6.Name = "Label6";
            size = new Size(0x2b, 13);
            this.Label6.Size = size;
            this.Label6.TabIndex = 0x3a;
            this.Label6.Text = "Hiển thị";
            this.CboHangSanXuat.FormattingEnabled = true;
            point = new System.Drawing.Point(0x1eb, 14);
            this.CboHangSanXuat.Location = point;
            this.CboHangSanXuat.Name = "CboHangSanXuat";
            size = new Size(0x102, 0x15);
            this.CboHangSanXuat.Size = size;
            this.CboHangSanXuat.TabIndex = 0x2e;
            this.CboHienThi.FormattingEnabled = true;
            point = new System.Drawing.Point(0x72, 0x41);
            this.CboHienThi.Location = point;
            this.CboHienThi.Name = "CboHienThi";
            size = new Size(0x102, 0x15);
            this.CboHienThi.Size = size;
            this.CboHienThi.TabIndex = 0x39;
            this.CboKho.FormattingEnabled = true;
            point = new System.Drawing.Point(0x72, 14);
            this.CboKho.Location = point;
            this.CboKho.Name = "CboKho";
            size = new Size(0x102, 0x15);
            this.CboKho.Size = size;
            this.CboKho.TabIndex = 0x2a;
            point = new System.Drawing.Point(0x21b, 0x42);
            this.updNam.Location = point;
            decimal num = new decimal(new int[] { 0x9c4, 0, 0, 0 });
            this.updNam.Maximum = num;
            num = new decimal(new int[] { 0x7d0, 0, 0, 0 });
            this.updNam.Minimum = num;
            this.updNam.Name = "updNam";
            size = new Size(0x3a, 20);
            this.updNam.Size = size;
            this.updNam.TabIndex = 0x38;
            num = new decimal(new int[] { 0x7d0, 0, 0, 0 });
            this.updNam.Value = num;
            this.Label1.AutoSize = true;
            this.Label1.BackColor = Color.Transparent;
            point = new System.Drawing.Point(0x16, 0x11);
            this.Label1.Location = point;
            this.Label1.Name = "Label1";
            size = new Size(0x35, 13);
            this.Label1.Size = size;
            this.Label1.TabIndex = 0x2b;
            this.Label1.Text = "Kho h\x00e0ng";
            point = new System.Drawing.Point(0x1eb, 0x42);
            this.updThang.Location = point;
            num = new decimal(new int[] { 12, 0, 0, 0 });
            this.updThang.Maximum = num;
            num = new decimal(new int[] { 1, 0, 0, 0 });
            this.updThang.Minimum = num;
            this.updThang.Name = "updThang";
            size = new Size(0x2d, 20);
            this.updThang.Size = size;
            this.updThang.TabIndex = 0x37;
            num = new decimal(new int[] { 1, 0, 0, 0 });
            this.updThang.Value = num;
            this.CboNhomHang.FormattingEnabled = true;
            point = new System.Drawing.Point(0x72, 40);
            this.CboNhomHang.Location = point;
            this.CboNhomHang.Name = "CboNhomHang";
            size = new Size(0x102, 0x15);
            this.CboNhomHang.Size = size;
            this.CboNhomHang.TabIndex = 0x2c;
            this.CmdOK.Image = ACCOUNTING.My.Resources.Resources.report;
            this.CmdOK.ImageAlign = ContentAlignment.MiddleLeft;
            point = new System.Drawing.Point(0x25b, 0x40);
            this.CmdOK.Location = point;
            this.CmdOK.Name = "CmdOK";
            size = new Size(0x60, 0x18);
            this.CmdOK.Size = size;
            this.CmdOK.TabIndex = 0x36;
            this.CmdOK.Text = "Xem nhanh";
            this.CmdOK.UseVisualStyleBackColor = true;
            this.Label2.AutoSize = true;
            this.Label2.BackColor = Color.Transparent;
            point = new System.Drawing.Point(0x16, 0x2c);
            this.Label2.Location = point;
            this.Label2.Name = "Label2";
            size = new Size(0x3e, 13);
            this.Label2.Size = size;
            this.Label2.TabIndex = 0x2d;
            this.Label2.Text = "Nh\x00f3m h\x00e0ng";
            this.Label13.AutoSize = true;
            this.Label13.BackColor = Color.Transparent;
            point = new System.Drawing.Point(0x18f, 0x45);
            this.Label13.Location = point;
            this.Label13.Name = "Label13";
            size = new Size(0x3d, 13);
            this.Label13.Size = size;
            this.Label13.TabIndex = 0x33;
            this.Label13.Text = "Th\x00e1ng năm";
            this.Label3.AutoSize = true;
            this.Label3.BackColor = Color.Transparent;
            point = new System.Drawing.Point(0x18f, 0x11);
            this.Label3.Location = point;
            this.Label3.Name = "Label3";
            size = new Size(0x4c, 13);
            this.Label3.Size = size;
            this.Label3.TabIndex = 0x2f;
            this.Label3.Text = "H\x00e3ng sản xuất";
            this.Label4.AutoSize = true;
            this.Label4.BackColor = Color.Transparent;
            point = new System.Drawing.Point(0x18f, 0x2b);
            this.Label4.Location = point;
            this.Label4.Name = "Label4";
            size = new Size(0x2b, 13);
            this.Label4.Size = size;
            this.Label4.TabIndex = 0x31;
            this.Label4.Text = "Xuất xứ";
            this.CboXuatXu.FormattingEnabled = true;
            point = new System.Drawing.Point(0x1eb, 40);
            this.CboXuatXu.Location = point;
            this.CboXuatXu.Name = "CboXuatXu";
            size = new Size(0x102, 0x15);
            this.CboXuatXu.Size = size;
            this.CboXuatXu.TabIndex = 0x30;
            this.C1DockingTab1.Controls.Add(this.C1DockingTabPage1);
            this.C1DockingTab1.Dock = DockStyle.Top;
            point = new System.Drawing.Point(0, 0);
            this.C1DockingTab1.Location = point;
            this.C1DockingTab1.Name = "C1DockingTab1";
            this.C1DockingTab1.SelectedIndex = 1;
            size = new Size(0x355, 0x7f);
            this.C1DockingTab1.Size = size;
            this.C1DockingTab1.TabAreaBackColor = Color.Red;
            this.C1DockingTab1.TabIndex = 0x2e;
            this.C1DockingTab1.TabsSpacing = 5;
            this.C1DockingTab1.TabStyle = TabStyleEnum.Office2007;
            this.C1DockingTab1.VisualStyle = C1.Win.C1Command.VisualStyle.Custom;
            this.C1DockingTab1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage1.Controls.Add(this.CmdExel);
            this.C1DockingTabPage1.Controls.Add(this.CboHangSanXuat);
            this.C1DockingTabPage1.Controls.Add(this.Label6);
            this.C1DockingTabPage1.Controls.Add(this.CboXuatXu);
            this.C1DockingTabPage1.Controls.Add(this.Label4);
            this.C1DockingTabPage1.Controls.Add(this.CboHienThi);
            this.C1DockingTabPage1.Controls.Add(this.Label3);
            this.C1DockingTabPage1.Controls.Add(this.CboKho);
            this.C1DockingTabPage1.Controls.Add(this.Label13);
            this.C1DockingTabPage1.Controls.Add(this.updNam);
            this.C1DockingTabPage1.Controls.Add(this.Label2);
            this.C1DockingTabPage1.Controls.Add(this.Label1);
            this.C1DockingTabPage1.Controls.Add(this.CmdOK);
            this.C1DockingTabPage1.Controls.Add(this.updThang);
            this.C1DockingTabPage1.Controls.Add(this.CboNhomHang);
            this.C1DockingTabPage1.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new System.Drawing.Point(1, 0x19);
            this.C1DockingTabPage1.Location = point;
            this.C1DockingTabPage1.Name = "C1DockingTabPage1";
            size = new Size(0x353, 0x65);
            this.C1DockingTabPage1.Size = size;
            this.C1DockingTabPage1.TabIndex = 0;
            this.C1DockingTabPage1.Text = "T\x00f9y chọn xem nhanh h\x00e0ng tồn kho";
            this.TabControl1.Controls.Add(this.C1DockingTabPage2);
            this.TabControl1.Dock = DockStyle.Fill;
            point = new System.Drawing.Point(0, 0x7f);
            this.TabControl1.Location = point;
            this.TabControl1.Name = "TabControl1";
            this.TabControl1.SelectedIndex = 1;
            size = new Size(0x355, 0x1cf);
            this.TabControl1.Size = size;
            this.TabControl1.TabIndex = 0x2f;
            this.TabControl1.TabsSpacing = 5;
            this.TabControl1.TabStyle = TabStyleEnum.Office2007;
            this.TabControl1.VisualStyle = C1.Win.C1Command.VisualStyle.Custom;
            this.TabControl1.VisualStyleBase = C1.Win.C1Command.VisualStyle.Office2007Blue;
            this.C1DockingTabPage2.Controls.Add(this.Panel1);
            this.C1DockingTabPage2.Controls.Add(this.VSlist);
            this.C1DockingTabPage2.Image = ACCOUNTING.My.Resources.Resources.Selected;
            point = new System.Drawing.Point(1, 0x19);
            this.C1DockingTabPage2.Location = point;
            this.C1DockingTabPage2.Name = "C1DockingTabPage2";
            size = new Size(0x353, 0x1b5);
            this.C1DockingTabPage2.Size = size;
            this.C1DockingTabPage2.TabIndex = 0;
            this.C1DockingTabPage2.Text = "Danh s\x00e1ch h\x00e0ng h\x00f3a tồn kho";
            this.Panel1.BackgroundImage = ACCOUNTING.My.Resources.Resources.bgleft;
            this.Panel1.Controls.Add(this.TxtTimTen);
            this.Panel1.Controls.Add(this.Label5);
            this.Panel1.Controls.Add(this.TxtTimMa);
            this.Panel1.Dock = DockStyle.Bottom;
            point = new System.Drawing.Point(0, 0x197);
            this.Panel1.Location = point;
            this.Panel1.Name = "Panel1";
            size = new Size(0x353, 30);
            this.Panel1.Size = size;
            this.Panel1.TabIndex = 0x21;
            point = new System.Drawing.Point(0xce, 4);
            this.TxtTimTen.Location = point;
            this.TxtTimTen.Name = "TxtTimTen";
            size = new Size(0x12f, 20);
            this.TxtTimTen.Size = size;
            this.TxtTimTen.TabIndex = 2;
            this.Label5.AutoSize = true;
            this.Label5.BackColor = Color.Transparent;
            point = new System.Drawing.Point(30, 7);
            this.Label5.Location = point;
            this.Label5.Name = "Label5";
            size = new Size(0x39, 13);
            this.Label5.Size = size;
            this.Label5.TabIndex = 1;
            this.Label5.Text = "T\x00ecm nhanh";
            point = new System.Drawing.Point(100, 4);
            this.TxtTimMa.Location = point;
            this.TxtTimMa.Name = "TxtTimMa";
            size = new Size(100, 20);
            this.TxtTimMa.Size = size;
            this.TxtTimMa.TabIndex = 0;
            this.VSlist.AllowEditing = false;
            this.VSlist.BorderStyle = C1.Win.C1FlexGrid.Util.BaseControls.BorderStyleEnum.Light3D;
            this.VSlist.ColumnInfo = manager.GetString("VSlist.ColumnInfo");
            this.VSlist.Dock = DockStyle.Fill;
            this.VSlist.ExtendLastCol = true;
            this.VSlist.FocusRect = FocusRectEnum.None;
            this.VSlist.KeyActionEnter = KeyActionEnum.MoveAcross;
            point = new System.Drawing.Point(0, 0);
            this.VSlist.Location = point;
            this.VSlist.Name = "VSlist";
            this.VSlist.Rows.Count = 1;
            this.VSlist.Rows.DefaultSize = 0x11;
            this.VSlist.SelectionMode = SelectionModeEnum.Row;
            size = new Size(0x353, 0x1b5);
            this.VSlist.Size = size;
            this.VSlist.StyleInfo = manager.GetString("VSlist.StyleInfo");
            this.VSlist.TabIndex = 0x20;
            this.VSlist.VisualStyle = C1.Win.C1FlexGrid.VisualStyle.Office2007Blue;
            SizeF ef = new SizeF(6f, 13f);
            this.AutoScaleDimensions = ef;
            this.AutoScaleMode = AutoScaleMode.Font;
            size = new Size(0x355, 590);
            this.ClientSize = size;
            this.Controls.Add(this.TabControl1);
            this.Controls.Add(this.C1DockingTab1);
            this.FormBorderStyle = FormBorderStyle.FixedDialog;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "Frm_TruyVanHangTonKho";
            this.ShowIcon = false;
            this.StartPosition = FormStartPosition.CenterScreen;
            this.Tag = "BH-0008";
            this.Text = "XEM NHANH HANG TON KHO";
            this.updNam.EndInit();
            this.updThang.EndInit();
            ((ISupportInitialize) this.C1DockingTab1).EndInit();
            this.C1DockingTab1.ResumeLayout(false);
            this.C1DockingTabPage1.ResumeLayout(false);
            this.C1DockingTabPage1.PerformLayout();
            ((ISupportInitialize) this.TabControl1).EndInit();
            this.TabControl1.ResumeLayout(false);
            this.C1DockingTabPage2.ResumeLayout(false);
            this.Panel1.ResumeLayout(false);
            this.Panel1.PerformLayout();
            this.VSlist.EndInit();
            this.ResumeLayout(false);
        }

        public void LoadHangHoa()
        {
            string str3 = "";
            if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboKho.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() == "")
            {
                LVYModule.ShowWarning(modGeneral.Tranlated("Bạn phải chọn kho h\x00e0ng để xem th\x00f4ng tin h\x00e0ng tồn!", ""));
            }
            else
            {
                switch (this.CboHienThi.SelectedIndex)
                {
                    case 1:
                        str3 = " AND TK.SoLuongTonDau + TK.SoLuongNhap - TK.SoLuongXuat > 0";
                        break;

                    case 2:
                        str3 = " AND TK.SoLuongTonDau + TK.SoLuongNhap - TK.SoLuongXuat < 0";
                        break;
                }
                str3 = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(str3 + " AND TK.KhoaKho = '", this.CboKho.SelectedValue), "'"));
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboNhomHang.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
                {
                    str3 = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(str3 + " AND HH.KhoaNhom = '", this.CboNhomHang.SelectedValue), "'"));
                }
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboHangSanXuat.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
                {
                    str3 = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(str3 + " AND HH.KhoaHangSanXuat = '", this.CboHangSanXuat.SelectedValue), "'"));
                }
                if (LVYModule.ReturnIfNull(RuntimeHelpers.GetObjectValue(this.CboXuatXu.SelectedValue), "", modGeneral.TypeOfValue.String).ToString().Trim() != "")
                {
                    str3 = Conversions.ToString(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(Microsoft.VisualBasic.CompilerServices.Operators.ConcatenateObject(str3 + " AND HH.KhoaQuocGia = '", this.CboXuatXu.SelectedValue), "'"));
                }
                string str = Conversions.ToString(this.updNam.Value) + LVYModule.sRight("00" + Conversions.ToString(this.updThang.Value), 2);
                string commandText = " SELECT IsNull(KH.Khoa,'') as KhoaKho, IsNull(KH.Ten" + modGeneral.H_LANGUAGE + ",'') as TenKho, HH.Khoa, HH.Ma as MaHang,  HH.Ten" + modGeneral.H_LANGUAGE + " as TenHang, DVT.Ten" + modGeneral.H_LANGUAGE + " as DonViTinh,  TK.SoLoHang, dbo.Char2Date(TK.NgayNhap) as NgayNhap, dbo.Char2Date(TK.HanSuDung) as HanSuDung,  IsNull(GB.GiaBan,0) as GiaBan,  IsNull(TK.SoLuongTonDau,0) + IsNull(TK.SoLuongNhap,0) - IsNull(TK.SoLuongXuat,0) as SoLuongTon  FROM DM_HangHoa HH left join DM_DonViTinh DVT on HH.KhoaDonViTinh = DVT.Khoa  LEFT join BH_GiaBan GB on HH.Khoa = GB.KhoaHangHoa and GB.GiaChuan = 1  LEFT Join ST_TonKhoDauKy TK on HH.Khoa = TK.KhoaHangHoa and TK.NamThang = '" + str + "' LEFT JOIN DM_Kho KH on TK.KhoaKho = KH.Khoa  WHERE 1 = 1 " + str3;
                this.objData = new DataView(DBHelper.ExecuteDataset(modGeneral.ConnectionString, CommandType.Text, commandText, new IDataParameter[0]).Tables[0]);
                this.VSlist.DataSource = this.objData;
                C1.Win.C1FlexGrid.C1FlexGrid vSlist = this.VSlist;
                vSlist.Cols[0].Visible = false;
                vSlist.Cols[1].Visible = false;
                vSlist.Cols[2].Visible = false;
                vSlist.Cols[7].Visible = false;
                vSlist.Cols[3].Width = 90;
                vSlist.Cols[4].Width = 270;
                vSlist.Cols[5].Width = 0x4b;
                vSlist.Cols[6].Width = 0x4b;
                vSlist.Cols[7].Width = 0x4b;
                vSlist.Cols[8].Width = 0x4b;
                vSlist.Cols[9].Width = 0x55;
                vSlist.Cols[10].Width = 70;
                vSlist.Cols[9].DataType = System.Type.GetType("System.Decimal");
                vSlist.Cols[10].DataType = System.Type.GetType("System.Decimal");
                vSlist[0, 1] = modGeneral.Tranlated("Kho h\x00e0ng", "");
                vSlist.Cols[9].Format = modGeneral.H_FORMATNUMBER;
                vSlist.Cols[10].Format = modGeneral.H_FORMATNUMBER;
                vSlist[0, 1] = modGeneral.Tranlated("Kho h\x00e0ng", "");
                vSlist[0, 3] = modGeneral.Tranlated("M\x00e3 h\x00e0ng", "");
                vSlist[0, 4] = modGeneral.Tranlated("T\x00ean h\x00e0ng", "");
                vSlist[0, 5] = modGeneral.Tranlated("Đơn vị t\x00ednh", "");
                vSlist[0, 6] = modGeneral.Tranlated("Số l\x00f4", "");
                vSlist[0, 7] = modGeneral.Tranlated("Ng\x00e0y nhập", "");
                vSlist[0, 8] = modGeneral.Tranlated("Hạn sử dụng", "");
                vSlist[0, 9] = modGeneral.Tranlated("Gi\x00e1 b\x00e1n", "");
                vSlist[0, 10] = modGeneral.Tranlated("Số lượng tồn", "");
                vSlist = null;
            }
        }

        public void SearchHangHoa()
        {
            if (this.VSlist.Rows.Count != 1)
            {
                string str2 = "";
                string str3 = "";
                string str = "";
                str2 = this.TxtTimMa.Text.Trim();
                str3 = this.TxtTimTen.Text.Trim();
                if (str2.Trim() != "")
                {
                    str = " MaHang LIKE '%" + str2 + "%'";
                }
                if (str3.Trim() != "")
                {
                    if (str.Trim() != "")
                    {
                        str = str + " And TenHang LIKE '" + str3 + "%'";
                    }
                    else
                    {
                        str = " TenHang LIKE '%" + str3 + "%'";
                    }
                }
                this.objData.RowFilter = str;
                if (this.VSlist.Rows.Count != 1)
                {
                    this.VSlist.Select(1, 0, 1, this.VSlist.Cols.Count - 1);
                }
            }
        }

        private void TxtTimMa_TextChanged(object sender, EventArgs e)
        {
            this.SearchHangHoa();
        }

        private void TxtTimTen_TextChanged(object sender, EventArgs e)
        {
            this.SearchHangHoa();
        }

        internal virtual C1DockingTab C1DockingTab1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTab1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTab1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage1 = value;
            }
        }

        internal virtual C1DockingTabPage C1DockingTabPage2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._C1DockingTabPage2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._C1DockingTabPage2 = value;
            }
        }

        internal virtual ComboBox CboHangSanXuat
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboHangSanXuat;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboHangSanXuat = value;
            }
        }

        internal virtual ComboBox CboHienThi
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboHienThi;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboHienThi = value;
            }
        }

        internal virtual ComboBox CboKho
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboKho;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboKho = value;
            }
        }

        internal virtual ComboBox CboNhomHang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboNhomHang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboNhomHang = value;
            }
        }

        internal virtual ComboBox CboXuatXu
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CboXuatXu;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._CboXuatXu = value;
            }
        }

        internal virtual System.Windows.Forms.Button CmdExel
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdExel;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdExel_Click);
                if (this._CmdExel != null)
                {
                    this._CmdExel.Click -= handler;
                }
                this._CmdExel = value;
                if (this._CmdExel != null)
                {
                    this._CmdExel.Click += handler;
                }
            }
        }

        internal virtual System.Windows.Forms.Button CmdOK
        {
            [DebuggerNonUserCode]
            get
            {
                return this._CmdOK;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.CmdOK_Click);
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click -= handler;
                }
                this._CmdOK = value;
                if (this._CmdOK != null)
                {
                    this._CmdOK.Click += handler;
                }
            }
        }

        internal virtual System.Windows.Forms.Label Label1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label1 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label13
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label13;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label13 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label2
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label2;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label2 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label3
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label3;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label3 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label4
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label4;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label4 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label5
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label5;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label5 = value;
            }
        }

        internal virtual System.Windows.Forms.Label Label6
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Label6;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Label6 = value;
            }
        }

        internal virtual Panel Panel1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._Panel1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._Panel1 = value;
            }
        }

        internal virtual C1DockingTab TabControl1
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TabControl1;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._TabControl1 = value;
            }
        }

        internal virtual System.Windows.Forms.TextBox TxtTimMa
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTimMa;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtTimMa_TextChanged);
                if (this._TxtTimMa != null)
                {
                    this._TxtTimMa.TextChanged -= handler;
                }
                this._TxtTimMa = value;
                if (this._TxtTimMa != null)
                {
                    this._TxtTimMa.TextChanged += handler;
                }
            }
        }

        internal virtual System.Windows.Forms.TextBox TxtTimTen
        {
            [DebuggerNonUserCode]
            get
            {
                return this._TxtTimTen;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                EventHandler handler = new EventHandler(this.TxtTimTen_TextChanged);
                if (this._TxtTimTen != null)
                {
                    this._TxtTimTen.TextChanged -= handler;
                }
                this._TxtTimTen = value;
                if (this._TxtTimTen != null)
                {
                    this._TxtTimTen.TextChanged += handler;
                }
            }
        }

        internal virtual NumericUpDown updNam
        {
            [DebuggerNonUserCode]
            get
            {
                return this._updNam;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._updNam = value;
            }
        }

        internal virtual NumericUpDown updThang
        {
            [DebuggerNonUserCode]
            get
            {
                return this._updThang;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._updThang = value;
            }
        }

        internal virtual C1.Win.C1FlexGrid.C1FlexGrid VSlist
        {
            [DebuggerNonUserCode]
            get
            {
                return this._VSlist;
            }
            [MethodImpl(MethodImplOptions.Synchronized), DebuggerNonUserCode]
            set
            {
                this._VSlist = value;
            }
        }
    }
}

